import request from '@/utils/request'

// 查询单列表
export function listForm(query) {
  return request({
    url: '/patrol/form/list',
    method: 'get',
    params: query
  })
}

// 查询单列表(不分页)
export function listFormNoPage() {
  return request({
    url: '/patrol/form/list/nopage',
    method: 'get'
  })
}
//填报表单
export function addReply(data) {
  return request({
    url: '/patrol/reply',
    method: 'post',
    data: data
  })
}

// 查询表单详情
export function details(id) {
  return request({
    url: '/patrol/filling/' + id,
    method: 'get'
  })
}

// 查询学校填报列表
export function listFilling(query) {
  return request({
    url: '/patrol/filling/list',
    method: 'get',
    params: query
  })
}

// 查询学校填报列表
export function singlist(query) {
  return request({
    url: '/patrol/filling/singlist',
    method: 'get',
    params: query
  })
}

// 查询学校填报列表(不分页)
export function singlistNoPage() {
  return request({
    url: '/patrol/filling/singlist/nopage',
    method: 'get'
  })
}

// 查询单详细
export function getForm(id) {
  return request({
    url: '/patrol/form/' + id,
    method: 'get'
  })
}

// 新增单
export function addForm(data) {
  return request({
    url: '/patrol/form',
    method: 'post',
    data: data
  })
}

// 修改单
export function updateForm(data) {
  return request({
    url: '/patrol/form',
    method: 'put',
    data: data
  })
}

// 删除单
export function delForm(id) {
  return request({
    url: '/patrol/form/' + id,
    method: 'delete'
  })
}

// 导出单
export function exportForm(query) {
  return request({
    url: '/patrol/form/export',
    method: 'get',
    params: query
  })
}
